package com.ww.springboot.boot.baseTest.design.模板;

/**
 * 描述：此类为模板类
 *
 * @author 🧑 ‍wanwei
 * @since 2023-02-04 15:06
 */
public abstract class AbstractClass {

    /**
     *
     */
    protected abstract void first();

    protected abstract void second();

    protected abstract void third();

    /**
     * 此方法为模板方法 尽量声明为final 避免被修改
     */
    final public void run() {
        this.first();
        this.second();
        this.third();
    }
}
